package cn.hznc.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @Author：Administrator
 * @Date：2023/5/16 10:50
 */
@Getter
@Setter
@Table(name = "t_tool_inventory_location_history")
@TableName(value = "t_tool_inventory_location_history")
public class ToolInventoryLocationHistoryEntity{

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 工件类型表id
     */
    @Column(name = "tool_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("tool_id")
    private Integer toolId;

    /**
     * 库位id
     */
    @Column(name = "inventory_location_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("inventory_location_id")
    private Integer inventoryLocationId;

    /**
     * 总成类型表id
     */
    @Column(name = "assembly_tool_inventory_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("assembly_tool_inventory_id")
    private Integer assemblyToolInventoryId;

    /**
     * 真实库存
     */
    @Column(name = "physical_inventory",type = MySqlTypeConstant.INT , length = 11)
    @TableField("physical_inventory")
    private Integer physicalInventory;

    /**
     * 最后更新时间
     */
    @Column(name = "snapshot_time",type = MySqlTypeConstant.DATETIME , length = 6)
    @TableField("snapshot_time")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date snapshotTime;
}
